-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Cloudflare turn servers #45
Conversation
Brutus5000
commented
Nov 27, 2024
•
edited
Loading
edited
3118207
to
38b6b2a
Compare
38b6b2a
to
d0e3e65
Compare
import jakarta.ws.rs.core.HttpHeaders | ||
|
||
@Priority(Priorities.AUTHENTICATION) | ||
class ApiKeyAuthenticationRequestFilter(turnApiKey: String) : ClientRequestFilter { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am a little surprised we have to write our own filter for this, but seems like that is the way to do it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not just you!
|
||
@Singleton | ||
class CloudflareSessionHandler( | ||
cloudflareProperties: CloudflareProperties, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing val?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
val is only required if I access the variable after initialization. This is not the case here, this it is not required
// A sample response looks like "stun:fr-turn1.xirsys.com" | ||
// The java URI class fails to read host and port due to the missing // after the : | ||
// Thus we "normalize" the uri, even though it is technically valid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is true for cloudflare as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Surprisingly, they also have the exact same response structure for credential and username. Maybe it is part of the RFC